<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<!--<![endif]-->
<head>
    <meta charset="utf-8"/>
    <title>我的订单 - 个人中心</title>
    <meta name="keywords" content="闪送，同城速递，专人直送，同城急件，代买，代送，代购，同城加急，同城快递，限时送达，最快的快递"/>
    <meta name="renderer" content="webkit"/>
    <meta name="description" content="闪送是国内最快的同城速递服务公司，专人直送，60分钟送达全城！24小时在线为用户提供同城急件,蛋糕,鲜花,生鲜,水果等限时递送服务。"/>
    <meta content="width=device-width, initial-scale=1.0" name="viewport"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <link rel="shortcut icon" th:href="@{/images/favicon.ico}"/>
    <link th:href="@{/css/font-awesome.min.css}" rel="stylesheet" type="text/css"/>
    <link th:href="@{/css/font-awesome-ie7.min.css}" rel="stylesheet" type="text/css"/>
    <link th:href="@{/css/bootstrap.min.css}" rel="stylesheet" type="text/css"/>

    <link th:href="@{/css/style-metronic.css?v=201509161736}" rel="stylesheet" type="text/css"/>
    <link th:href="@{/css/style.css?v=2016120801}" rel="stylesheet" type="text/css"/>
    <link th:href="@{/css/style-responsive.css}" rel="stylesheet" type="text/css"/>
    <link th:href="@{/css/blue.css?v=2016120801}" rel="stylesheet" type="text/css" id="style_color"/>
    <link th:href="@{/css/daterangepicker.css?v=20150503203601}" rel="stylesheet" type="text/css"/>
    <link th:href="@{/css/jquery.fancybox.css}" rel="stylesheet"/>
    <link th:href="@{/css/jquery.raty.css}" rel="stylesheet"/>
    <link th:href="@{/css/pagination.css}" rel="stylesheet" type="text/css"/>
    <link th:href="@{/css/order_base.css?v=20161019001}" rel="stylesheet" type="text/css" id="style_color"/>
    <link th:href="@{/css/timepicker.css}" rel="stylesheet" type="text/css"/>
    <link th:href="@{/css/jquery.fancybox.css}" rel="stylesheet"/>

    <link th:href="@{/css/custom.css?v=20161209192433}" rel="stylesheet" type="text/css" id="style_color"/>
    <link th:href="@{/css/autocomplete.css}" rel="stylesheet" type="text/css"/>
    <!-- confirmaddress.jsp style -->
    <link th:href="@{/css/confirmaddress.css}" rel="stylesheet" type="text/css" id="style_color"/>
    <link th:href="@{/css/iss.css?v=201607182014}" rel="stylesheet" type="text/css"/>
    <link th:href="@{/css/modules.css?v=2016120801}" rel="stylesheet" type="text/css"/>
    <link th:href="@{/css/common.css?v=20170316184648}" rel="stylesheet" type="text/css"/>
    <link th:href="@{/css/index.css?v=20170316184648}" rel="stylesheet" type="text/css"/>

    <script th:src="@{/js/jquery-3.5.1.js}" type="text/javascript"></script>
    <script th:src="@{/layer/layer.js}" type="text/javascript"></script>
    <!-- BEGIN PAGE LEVEL PLUGIN STYLES -->
    <link th:href="@{/css/jquery.fancybox.css}" rel="stylesheet"/>
    <link th:href="@{/css/jquery.raty.css}" rel="stylesheet"/>
    <link th:href="@{/css/webuploader.css}" rel="stylesheet"/>
    <!-- END PAGE LEVEL PLUGIN STYLES -->
    <style type="text/css">
        .selector-for-some-widget {
            -webkit-box-sizing: content-box;
            -moz-box-sizing: content-box;
            box-sizing: content-box;
        }

        #list-item-detail-part,
        #list-item-result-part {
            display: none;
        }

        .list-group-item {
            text-align: left;
        }

        #list-item-detail-part p {
            text-align: left;
        }

        #list-item-detail-part .media-left {
            display: table-cell;
        }

        #list-item-detail-part .media-body {
            display: table-cell;
            vertical-align: middle;
        }

        #inputtousu_ordernum {
            margin-bottom: 0px;
        }

        .form-inline {
            margin-bottom: 10px;
        }

        #fileList .file-item {
            width: 81px;
            height: 81px;
            overflow: hidden;
            float: left;
            margin-right: 5px;
        }

        #fileList .info {
            display: none;
        }

        #filePicker {
            width: 82px;
            height: 38px;
            overflow: hidden;
        }

        .webuploader-pick {
            opacity: 0;
        }

        .tousu_modal_part_btn {

            background: url(images/ts.png ") left center no-repeat; background-size: 30%; color: #666; text-align: right; padding-left: 25px; } #tousu_lianxifangshi{ width:100%; height: 34px; } #tousu_submit_btn{ width: 150px; border-radius: 3px; margin-top:15px; background-image: -moz-linear-gradient(top, #febd1b, #ff8814); /* Firefox */ background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #febd1b), color-stop(1, #ff8814)); /* Saf4+, Chrome */ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr= '#febd1b' , endColorstr= '#ff8814' , GradientType= '0'); /* IE*/ } #type_level_onelist { width: 160px; } #type_level_twolist { width: 300px; } #tousu_yuanyin { width: 470px; } #fileList .error { margin-top: -30px; } .editMobile { display: inline-block; width: 15px; height: 15px; } .editMobile img { width: 100%; }
    </style>
    <style type="text/css">.dropdown-submenu:hover& gt

    ;
    .dropdown-menu {
        display: none
    }</style>
    <style type="text/css">.dropdown-submenu:hover& gt

    ;
    .dropdown-menu {
        display: none
    }</style>
    <style type="text/css">.dropdown-submenu:hover& gt

    ;
    .dropdown-menu {
        display: none
    }</style>

    <script>
        function delOrder(orderId,e) {
            layer.confirm('确认删除订单吗', {
                btn: ['确认', '取消'],
                offset: '300px'//按钮
            }, function () {
                $.post("/order/del", {orderId:orderId}, function (data) {
                    if (data.code == 200) {
                        layer.msg("已删除")
                        location.href = "/order/list";
                    }
                })

            });
        }

        function evaluate(orderId) {
            //iframe层-父子操作
            sessionStorage.setItem("orderId", orderId)
            layer.open({
                type: 2,
                offset: '50px',//按钮
                title: '订单评价',
                shadeClose: true,
                shade: 0.8,
                area: ['700px', '450px'],
                fixed: false, //不固定
                maxmin: true,
                content: '/comment/init',
                end: function (index, layero) {
                    layer.alert("感谢您的支持", function (index) {
                        location.href = "/order/list";
                        layer.close(index)
                    })
                }

            });
        }

        function appeal(orderId) {
            $.getJSON("/order/appeal/" + orderId, function (data) {
                if (data.code === 200) {
                    console.log("1")
                    layer.msg('已申请赔付，等待处理', {offset: '250px'});
                } else {
                    layer.msg('服务器繁忙，请稍后再试', {offset: '250px'});
                }
            })
        }

        function receive(orderId) {
            $.getJSON("/order/receive/" + orderId, function (data) {
                if (data.code == 200) {
                    layer.msg('确认收货，期待下次与您相遇！', {offset: '250px'});
                } else {
                    layer.msg('服务器繁忙，请稍后再试', {offset: '250px'});
                }
            })
        }
    </script>
</head>
<body>
<!-- BEGIN HEADER -->
<div class="hContent headerInfo">
    <header th:replace="~{commons::#top}"/>
</div>
<div class="js_pop pop_window" style="display: none">
    <span class="closePopIcon js_pop_cancel"></span>
    <div class="title js_pop_tit"></div>
    <div class="btns">
        <button class="js_pop_btn btn blue"></button>
    </div>
</div>
<div class="bottom_bar"></div>

<div class="page-container" id="container_wrapper">
    <!-- BEGIN CONTAINER -->
    <div class="js-comp container min-hight margin-bottom-40 my-order-list" data-module="MyOrderList">
        <div class="left-menu">
            <dl>
                <dt>
                    <a th:href="@{/order/list}"> <i class="icon-my-order"></i> 我的订单 </a>
                </dt>
            </dl>
            <dl>
                <dt>
                    <div>
                        <i class="icon-my-account"></i> 我的账户
                    </div>
                </dt>
                <dd>
                    <a th:href="@{/user/userAccount}"> 账户余额 </a>
                </dd>
                <dd>
                    <a th:href="@{/user/userPay}"> 充值 </a>
                </dd>
                <dd>
                    <a th:href="@{/user/discount}"> 优惠券 </a>
                </dd>
                <dd>
                    <a th:href="@{/user/usualInfo}"> 常用信息 </a>
                </dd>
                <dd>
                    <a th:href="@{/user/initcost}"> 消费统计 </a>
                </dd>
            </dl>

            <dl>
                <dt>
                    <div>
                        <i class="icon-settings"></i> 设置
                    </div>
                </dt>
                <dd>
                    <a th:href="@{/user/updatepwd}"> 修改密码 </a>
                </dd>
            </dl>

        </div>
        <div class="row  right-container">
            <ul class="nav nav-tabs" id="subtask">
                <li th:class="${flag=='list'}?'active':''"><a id="history" th:href="@{/order/list}">全部订单</a></li>
                <li th:class="${flag=='today'}?'active':''"><a id="today" th:href="@{/order/today}">今日订单</a></li>
                <li th:class="${flag=='riding'}?'active':''"><a id="delivery" th:href="@{/order/riding}">闪送中</a></li>
                <li th:class="${flag=='received'}?'active':''"><a id="rank" th:href="@{/order/received}">待评价</a></li>
                <li th:class="${flag=='cancel'}?'active':''"><a id="cancel" th:href="@{/order/cancel}">已取消</a></li>
            </ul>

            <table class="table table-striped table-bordered table-advance table-hover">
                <thead>
                <tr>
                    <th style="width: 180px" nowrap="nowrap"><i class="glyphicon glyphicon-th-list"></i>订单</th>
                    <th style="width: 240px"><i class="icon-map-marker"></i>寄件人信息/收件人信息</th>
                    <th style="width: 140px"><i class="icon-calendar"></i>费用信息</th>
                    <th style="width: 185px"><i class="icon-wrench"></i>闪送员</th>

                    <th nowrap="nowrap"><i class="glyphicon glyphicon-remove-circle"></i>操作</th>
                </tr>
                </thead>
                <tbody>
                <tr th:each="order:${orders}">
                    <td>订单号：
                        <th:block th:text="${order.no}"></th:block>
                        <br/> 下单时间：<font>
                            <th:block th:text="${order.orderTime}"></th:block>
                        </font><br/> <input class="orderCreateTime" value="" type="hidden"/></td>
                    <td>寄件人信息：
                        <th:block th:text="${order.sendInfo}"></th:block>
                        </th:block><br/><br/>
                        <!--收件人信息-->
                        <div class="taskInfo" data-task="24817265" data-order="DH2017031710027856" data-sta="0"
                             data-sta-desc="未派送" data-type="PC端">
                            收件人信息：
                            <th:block th:text="${order.recInfo}"></th:block>
                            <span class="editMobile" data-toggle="modal" data-target="#edit-mobile-24817265"><img
                                    th:src="@{/images/edit_icon.png}"/></span>
                            <span class="badge badge-green">
                                <th:block th:if="${order.status}==1">待配送</th:block>
          <th:block th:if="${order.status}==2">配送中</th:block>
           <th:block th:if="${order.status}==3">已超时</th:block>
           <th:block th:if="${order.status}==4">待评价</th:block>
           <th:block th:if="${order.status}==5">已完成</th:block>
           <th:block th:if="${order.status}==6">已删除</th:block>
                                <th:block th:if="${order.status}==7">未付款</th:block>
                                <th:block th:if="${order.status}==8">待审核</th:block>
                                <th:block th:if="${order.status}==9">已赔付</th:block>
                                <th:block th:if="${order.status}==10">已超时</th:block>
                                <th:block th:if="${order.status}==11">暂无骑手接单</th:block>
                                <th:block th:if="${order.status}==12">待取件</th:block>
                                <th:block th:if="${order.status}==13">已取消</th:block>
                                <th:block th:if="${order.status}==14">已赔付，待评价</th:block>
                                <th:block th:if="${order.status}==15">已赔付，待评价</th:block>

          </span>
                            <br/>
                        </div>
                    </td>
                    <td>
                        <p th:text="|总价:${order.totalMoney}|"></p>
                        <p th:text="|总公里:${order.distance}|"></p>
                        <th:block th:text="'总重量：'+${order.weight}"></th:block>
                    </td>
                    <td class="order-operaDH2017031710027856" style="word-break:break-all;position: relative;"><br/>
                        <span th:text="${order.riderPhone}? '联系闪送员：'+${order.riderPhone} : '别急，闪送员马上接单'"></span>
                        <br/>
                        <!--                        <a class="btn blue recover-black-js" href="" th:if="${order.riderId}">拉黑骑手 </a>-->
                    </td>

                    <td>
                        <div th:switch="${order.status}">
                            <span th:case="'2'">
                                <a class="btn btn-sm green" th:href="@{|javascript:receive(${order.id})|}"
                                   role="button">确认收货</a>
                                <br/>
                                <br/>
                                <a class="btn btn-sm green" th:href="@{|javascript:appeal(${order.id})|}" role="button">申请赔付</a>
                            </span>
                            <span th:case="'3'">
                                <a class="btn btn-sm green" th:href="@{|javascript:receive(${order.id})|}"
                                   role="button">确认收货</a>
                                <br/>
                                <br/>
                                <a class="btn btn-sm green" th:href="@{|javascript:appeal(${order.id})|}" role="button">申请赔付</a>
                            </span>
                            <a th:case="'4'" class="btn btn-sm green" th:href="@{|javascript:evaluate(${order.id})|}"
                               role="button">去评价</a>
                            <a th:case="'7'" class="btn btn-sm green" th:href="@{|/order/cof/${order.id}|}" role="button">去付款</a>
                            <a th:case="'14'" class="btn btn-sm green" th:href="@{|javascript:evaluate(${order.id})|}"
                               role="button">去评价</a>
                            <a th:case="'15'" class="btn btn-sm green" th:href="@{|javascript:evaluate(${order.id})|}"
                               role="button">去评价</a>
                            <br/>
                            <!--                            <form th:case="'5'" id="delForm" method="post" th:action="@{/order/del}">-->
                            <!--                                <input type="hidden"  name="orderId" th:value="${order.id}">-->
                            <input th:case="5" class="btn btn-sm red" value="删除订单" th:onclick="|delOrder(${order.id},this)|"
                                   type="button"/>
                            <input th:case="16" class="btn btn-sm red" value="删除订单" th:onclick="|delOrder(${order.id},this)|"
                                   type="button"/>
                            <input th:case="17" class="btn btn-sm red" value="删除订单" th:onclick="|delOrder(${order.id},this)|"
                                   type="button"/>
                            <input th:case="10" class="btn btn-sm red" value="删除订单" th:onclick="|delOrder(${order.id},this)|"
                                   type="button"/>
                            <!--                            </form>-->
                            <!--                            <form th:case="'16'" id="delForm" method="post" th:action="@{/order/del}">-->
                            <!--                                <input type="hidden"  name="orderId" th:value="${order.id}">-->
                            <!--                                <input class="btn btn-sm red" value="删除订单" onclick="delOrder()" type="button"/>-->
                            <!--                            </form>-->
                            <!--                            <form th:case="'17'" id="delForm" method="post" th:action="@{/order/del}">-->
                            <!--                                <input type="hidden" name="orderId" th:value="${order.id}">-->
                            <!--                                <input class="btn btn-sm red" value="删除订单" onclick="delOrder()" type="button"/>-->
                            <!--                            </form>-->
                        </div>
                    </td>
                </tr>
                </tbody>
            </table>
            <div class="row">
                <div class="col-sm-12">
                </div>
            </div>
            <!--            <div class="row">-->
            <!--                <div class="col-sm-12">-->
            <!--                    <div class="dataTables_info pull-right" id="sample_1_info">-->
            <!--                        总共 1 页，1 条记录，每页 10 条记录-->
            <!--                    </div>-->
            <!--                </div>-->
            <!--            </div>-->
        </div>
    </div>
</div>
<footer th:replace="~{commons::#footer}"/>
</body>
</html>